<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    
    <button>Change colors</button>
    <span>1</span> 
    <div>2</div> 
    <div>3</div>
    
    <div>4</div> 
    <div>5</div>
    <div id="stop">Stop here</div> 
    <div>6</div>    
    
    <div>7</div>
    <div>8</div>
    <script src="../js/jquery.3.5.1.js"></script>
    <!-- <script>
        $("button").click(function () { 
            $("div").each(function (index, domEle) { 
                // domEle == this 
                $(domEle).css("backgroundColor", "yellow");  
                if ($(this).is("#stop")) { 
                    $("span").text("Stopped at div index #" + index); 
                    return false; 
                } 
            });
        });
    </script> -->


    <script>
        $("div").get(0).css("color", "red");
    </script>
</body>

</html>